package com.infodms.dms.actions.claim.auditing.rule.custom.elment;

import com.infodms.dms.actions.claim.auditing.ClaimOrderVO;
import com.infodms.dms.dao.claim.auditing.ClaimAuditingDao;
import com.infodms.dms.po.TmVhclMaterialGroupPO;

/**
 * 索赔授权项：车型代码
 * @author XZM
 */
public class Element11 extends AbstractElement {

	/**
	 * 车型代码
	 */
	@Override
	public Object getElementValue(ClaimOrderVO orderVO) {
		
		String modelCode = null;
		if(orderVO.getVehiclePO()==null)
			return modelCode;
		
		ClaimAuditingDao auditingDao = ClaimAuditingDao.getInstance();
		
		Long grouId = orderVO.getVehiclePO().getModelId();
		TmVhclMaterialGroupPO mgPO = auditingDao.queryMaterialGroupById(grouId);
		
		if(mgPO!=null){
			modelCode = mgPO.getGroupCode();
		}
		
		return modelCode;
	}

}
